package com.atguigu06.otherstream;

import org.junit.Test;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.logging.Logger;


/**
 * ClassName: OtherSrreamTest
 * Package: com.atguigu06.otherstream
 * Description:
 *
 * @Author BuTang
 * @Create 2023/6/20 9:27
 * @Version 1.0
 */
public class OtherSrreamTest {

    /**
     * 打印流和日志
     * @throws FileNotFoundException
     */
    @Test
    public void test1() throws FileNotFoundException {
        OutputStream o = new FileOutputStream("abc.txt");
        PrintStream out = new PrintStream(o);
        System.setOut(out);

        char c  ;
        for (int i = 0; i < 50; i++) {
            System.out.println((char) i);
        }


    }
    @Test
    public void test2() throws FileNotFoundException {
        Looger.log("你好");
    }
}
